home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _ChooseFont.au3 < prev    next >
Text File  |  2007-09-08  |  1KB  |  36 lines

  1. #include <Misc.au3>
  2.  
  3. Local $a_font
  4.  
  5. ; Example 1
  6. $a_font = _ChooseFont("Arial", 8)
  7. If (@error) Then
  8.     MsgBox(0, "", "Error _ChooseFont: " & @error)
  9. Else
  10.     MsgBox(0, "", "Font Name: " & $a_font[2] & @LF & "Size: " & $a_font[3] & @LF & "Weight: " & $a_font[4] & @LF & "COLORREF rgbColors: " & $a_font[5] & @LF & "Hex BGR Color: " & $a_font[6] & @LF & "Hex RGB Color: " & $a_font[7])
  11. EndIf
  12.  
  13. ; Example 2
  14. $a_font = _ChooseFont()
  15. If (@error) Then
  16.     MsgBox(0, "", "Error _ChooseFont: " & @error)
  17.     Exit
  18. Else
  19.     MsgBox(0, "", "Font Name: " & $a_font[2] & @LF & "Size: " & $a_font[3] & @LF & "Weight: " & $a_font[4] & @LF & "COLORREF rgbColors: " & $a_font[5] & @LF & "Hex BGR Color: " & $a_font[6] & @LF & "Hex RGB Color: " & $a_font[7])
  20. EndIf
  21.  
  22. ; Example 3
  23. Local $FontName = $a_font[2]
  24. Local $FontSize = $a_font[3]
  25. Local $ColorRef = $a_font[5]
  26. Local $FontWeight = $a_font[4]
  27. Local $Italic = BitAND($a_font[1], 2)
  28. Local $Underline = BitAND($a_font[1], 4)
  29. Local $Strikethru = BitAND($a_font[1], 8)
  30. $a_font = _ChooseFont($FontName, $FontSize, $ColorRef, $FontWeight, $Italic, $Underline, $Strikethru)
  31. If (@error) Then
  32.     MsgBox(0, "", "Error _ChooseFont: " & @error)
  33. Else
  34.     MsgBox(0, "", "Font Name: " & $a_font[2] & @LF & "Size: " & $a_font[3] & @LF & "Weight: " & $a_font[4] & @LF & "COLORREF rgbColors: " & $a_font[5] & @LF & "Hex BGR Color: " & $a_font[6] & @LF & "Hex RGB Color: " & $a_font[7])
  35. EndIf
  36.